SpreadsheetGear 2017
WithLock<TResult>(Func<TResult>) Method






SpreadsheetGear Namespace > IWorkbookSet Interface > WithLock Method : WithLock<TResult>(Func<TResult>) Method
The type of the result returned by 'func'.
The function to run.
Calls GetLock(), runs the specified Func, calls ReleaseLock() and then returns the value returned by the Func.
Syntax
'Declaration
 
Overloads Function WithLock(Of TResult)( _
   ByVal func As System.Func(Of TResult) _
) As TResult
'Usage
 
Dim instance As IWorkbookSet
Dim func As System.Func(Of TResult)
Dim value As TResult
 
value = instance.WithLock(Of TResult)(func)
TResult WithLock<TResult>( 
   System.Func<TResult> func
)
function WithLock( 
    func: System.Func
): TResult; 
function WithLock( 
   func : System.Func
) : TResult;
TResult* WithLock<TResult>( 
   System.Func<TResult*>* func
) 
TResult^ WithLockgeneric<typename TResult>
( 
   System.Func<TResult^>^ func
) 

Parameters

func
The function to run.

Type Parameters

TResult
The type of the result returned by 'func'.

Return Value

The value returned by 'func'.
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

IWorkbookSet Interface
IWorkbookSet Members
Overload List
WithLock(Action) Method
GetLock Method
ReleaseLock Method